<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
	<head>
		<meta charset="utf-8"/>
		<meta name="viewport" content="width=device-width,initial-scale=1"/>
		<title>考试系统</title>
		<link type="text/css" th:href="@{/css/important_css.css}" rel="stylesheet"/>
		<script type="text/javascript" th:src="@{/js/jquery.js}"></script>
		<script type="text/javascript" th:src="@{/exam/js/main.js}"></script>
		<script type="text/javascript" th:src="@{/js/icheck.js}"></script>
		<script type="text/javascript" th:src="@{/js/zebra_dialog.src.js}"></script>
		<script th:src="@{/js/jqPaginator.min.js}" type="text/javascript"></script>
		<script th:src="@{/js/time.js}" type="text/javascript"></script>
	</head>
	<body onload="changeMain('exam-home')">
		<!--头部开始-->
		<div class="header">
			<div class="headerl">
				<ul>
					<li><img class="headerl-img" th:src="@{/images/exam_logo.png}" /></li>
				</ul>
			</div>
			<div class="headerr">
				<ul>
					<li id="time"></li>
				    <li class="user"><span th:text="${session.user.userName}" id="userName"></span></li>		
					<li class="close" onclick="closed()">退出<input type="hidden" id="initPage" name="initPage" th:value="${initPage}"/></li>
				</ul>
			</div>
		</div>
		<!--头部结束-->
		<!--主体开始-->
		<div class="main">
           <div id="frameReft"></div>
		</div>
		<!--主体结束-->
		<!--底部导航-->
		<div class="foot-nav">
		   <div class="foot-nav-b foot-nav-bc">
		   	  <ul id="per">
		   	  	<li><a th:href="@{/index}"><img th:src="@{/images/btn_nav_01.png}" id='btn_nav_01'/></a></li>
		   	  	<li th:style= "${session.pm.perCode.contains('KS_questionManage')}?'':'display:none'" onclick="changeMain('/questions/questions')"><img th:src="@{/exam/images/btn_nav_02.png}" id='btn_nav_02'/></li>
		   	  	<li th:style= "${session.pm.perCode.contains('KS_paperManage')}?'':'display:none'" onclick="changeMain('/paperManager/papers')"><img th:src="@{/exam/images/btn_nav_03.png}" id='btn_nav_03'/></li>
		   	  	<li th:style= "${session.pm.perCode.contains('KS_resultsView')}?'':'display:none'" onclick="changeMain('/examReport/report')"><img th:src="@{/exam/images/btn_nav_04.png}" id='btn_nav_04'/></li>
		   	  	<li th:style= "${session.pm.perCode.contains('KS_takeTest')}?'':'display:none'" onclick="changeMain('/paperManager/wtake')"><img th:src="@{/exam/images/btn_nav_05.png}" id='btn_nav_05'/></li>
		   	  	<li th:style= "${session.pm.perCode.contains('KS_myTest')}?'':'display:none'" onclick="changeMain('/examReport/results')"><img th:src="@{/exam/images/btn_nav_06.png}" id='btn_nav_06'/></li>
		   	  	
		   	  	
		   	  	
		   	  </ul>
		   </div>
		</div>
	</body>
	
<script th:inline="javascript">  
/*<![CDATA[*/  
    var code =[[${session.pm.perCode}]];
    if(code!=null){
        var len=code.length;
        var codeName=code.substring(0,len-1).split(",");
        var le=1;
        for (var i=0;i<codeName.length;i++)
        {
        	if(codeName[i].indexOf("KS")>-1){
        		le+=1
        	}
        }

        if(le>1){
            $(".foot-nav-bc").width(le*160);
        }else{
         	$("#per li").each(function(){
        	    $(this).css('display','block'); 
        	});
            $(".foot-nav-bc").width(6*160);
        }
    }else{
    	$("#per li").each(function(){
    	    $(this).css('display','block'); 
    	});
    	$(".foot-nav-bc").width(6*160);
    }
    function closed(){
		$.Zebra_Dialog('<div class="prompt"><a class="closed-color" href="javascript:void(0)"  onclick="runTime(\'taskkillIE\')"  >退出系统</a><a class="closed-color" href="javascript:void(0)" onclick="runTime(\'shutdown\')" >关机</a></div>', {
            'title':'提示',
            'buttons':[{caption:'取消'}]
        });
	}
    function runTime(par) {
		 $.ajax({
		     type: "post",
		     dataType: "json",
		     url:"/Tool/"+par ,
		     success: function (data, status) {
		    	 
		     },
		     error: function (data) {
		
		     }
		 }); 		 
	}
	

/*]]>*/  
</script>	
	
	
</html>
